SCRIPT | NN n/a IE 4 DOM 1 | ||
The SCRIPT object reflects the SCRIPT element. Note that the Win32 version of Internet Explorer chokes on accessing or setting the innerHTML or innerText properties. | |||
HTML Equivalent<SCRIPT> | |||
Object Model Reference
|
defer | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
Whether the browser should proceed with rendering regular HTML content without looking for the script to generate content as the page loads. This value needs to be set in the SCRIPT element's tag at run-time. When this property is set to true by the addition of the DEFER attribute to the tag, the browser does not have to hold up rendering further HTML content to parse the content of the SCRIPT element in search of document.write( ) statements. Changing this property's value after the document loads does not affect the performance of the script or browser. | |||
Exampledocument.all.myScript.defer = "true" | |||
Value Boolean value: true | false. | |||
|
event | NN n/a IE 4 DOM n/a | ||
Read-only | |||
Internet Explorer 4's event model allows binding of object
events to SCRIPT elements with the help of the
EVENT and FOR attributes (see
| |||
Exampleif (document.all.scripts[2].event == "onresize") { ... } | |||
Value Case-sensitive event name. | |||
|
htmlFor | NN n/a IE 4 DOM n/a | ||
Read-only | |||
Returns the value (element ID) assigned to the FOR attribute of a SCRIPT element. This attribute defines the document element to which the script is bound when a specific event (set by the EVENT attribute) fires for the element. | |||
Exampleif (document.all.scripts[3].htmlFor == "helpButton") { ... } | |||
Value String. | |||
|
readyState | NN n/a IE 4 DOM n/a | ||
Read-only | |||
Returns the current download status of the script being loaded from an external library (.js) file. This property provides a more granular way of testing whether a particular downloadable element is ready to be run or scripted instead of the onLoad event handler for the entire document. As the value of this property changes during loading, the system fires an onReadyStateChange event. | |||
Exampleif (document.all.myExternalScript.readyState == "uninitialized") { } | |||
Value One of the following values (as strings): complete | interactive | loading | uninitialized. Some elements may allow the user to interact with partial content, in which case the property may return interactive until all loading has completed. | |||
|
src | NN n/a IE 4 DOM 1 | ||
Read-only | |||
URL of the .js script file imported into the current SCRIPT element. | |||
Exampleif (document.all.scripts2.src == "scripts/textlib.js") { ... } | |||
Value Complete or relative URL as a string. | |||
|
text | NN n/a IE 4 DOM 1 | ||
Read-only | |||
The text content of the element. | |||
Examplevar scriptText = document.all.script3.text | |||
Value String. | |||
|
type | NN n/a IE 4 DOM 1 | ||
Read-only | |||
An advisory about the content type of the script statements. The content type should tell the browser which scripting engine to use to interpret the script statements, such as text/javascript. The TYPE attribute may eventually replace the LANGUAGE attribute as the one defining the scripting language in which the element's statements are written. | |||
Examplevar scriptMIMEtype = document.all.script3.type | |||
Value String. | |||
|